package com.example.hasee.logactivity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {
    private static final String TAG = "MainActivity";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.v(TAG,"FirstActivity——>onCreate");
        setContentView(R.layout.log_layout1);
        Button b1 = (Button) findViewById(R.id.b1);
        b1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this,second.class);
                startActivity(intent);
            }
        });
    }
    @Override
    protected void onStart(){
        super.onStart();
        Log.v(TAG,"FirstActivity——>onStart");
    }
    @Override
    protected void onResume(){
        super.onResume();
        Log.v(TAG,"Firstactivity——>onResume");
    }
    @Override
    protected void onPause(){
        super.onPause();
        Log.v(TAG,"FirstActivity——>onPouse");
    }
    @Override
    protected void onStop(){
        super.onStop();
        Log.v(TAG,"FirstActivity——>onStop");
    }
    @Override
    protected void onDestroy(){
        super.onDestroy();
        Log.v(TAG,"FirstActivity——>onDestroy");
    }
    @Override
    protected void onRestart(){
        super.onRestart();
        Log.v(TAG,"FirstActivity——>onRestart");
    }

}
